package com.ruoyi.guide.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.guide.mapper.XlkjGuideMapper;
import com.ruoyi.guide.domain.XlkjGuide;
import com.ruoyi.guide.service.IXlkjGuideService;

/**
 * 办事指南Service业务层处理
 * 
 * @author wang
 * @date 2022-01-15
 */
@Service
public class XlkjGuideServiceImpl implements IXlkjGuideService 
{
    @Autowired
    private XlkjGuideMapper xlkjGuideMapper;

    /**
     * 查询办事指南
     * 
     * @param id 办事指南主键
     * @return 办事指南
     */
    @Override
    public XlkjGuide selectXlkjGuideById(Long id)
    {
        return xlkjGuideMapper.selectXlkjGuideById(id);
    }

    /**
     * 查询办事指南列表
     * 
     * @param xlkjGuide 办事指南
     * @return 办事指南
     */
    @Override
    public List<XlkjGuide> selectXlkjGuideList(XlkjGuide xlkjGuide)
    {
        return xlkjGuideMapper.selectXlkjGuideList(xlkjGuide);
    }

    /**
     * 新增办事指南
     * 
     * @param xlkjGuide 办事指南
     * @return 结果
     */
    @Override
    public int insertXlkjGuide(XlkjGuide xlkjGuide)
    {
        xlkjGuide.setCreateTime(DateUtils.getNowDate());
        return xlkjGuideMapper.insertXlkjGuide(xlkjGuide);
    }

    /**
     * 修改办事指南
     * 
     * @param xlkjGuide 办事指南
     * @return 结果
     */
    @Override
    public int updateXlkjGuide(XlkjGuide xlkjGuide)
    {
        xlkjGuide.setUpdateTime(DateUtils.getNowDate());
        return xlkjGuideMapper.updateXlkjGuide(xlkjGuide);
    }

    /**
     * 批量删除办事指南
     * 
     * @param ids 需要删除的办事指南主键
     * @return 结果
     */
    @Override
    public int deleteXlkjGuideByIds(Long[] ids)
    {
        return xlkjGuideMapper.deleteXlkjGuideByIds(ids);
    }

    /**
     * 删除办事指南信息
     * 
     * @param id 办事指南主键
     * @return 结果
     */
    @Override
    public int deleteXlkjGuideById(Long id)
    {
        return xlkjGuideMapper.deleteXlkjGuideById(id);
    }
}
